]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Always clear details pane when unsetting more mode
authorColin Walters <walters@space-ghost.verbum.org>
Sat, 11 Jul 2009 16:33:57 +0000 (12:33 -0400)
committerColin Walters <walters@space-ghost.verbum.org>
Mon, 13 Jul 2009 15:01:50 +0000 (11:01 -0400)
We don't want a detail pane hanging around for an item no
longer visible.

js/ui/overlay.js

index 3c8fb5384e227e263231245560d0a467da9ee1a6..786b6498a1083f0c1df8b8aacca4bfadc9ee265e 100644 (file)
@@ -325,7 +325,7 @@ Dash.prototype = {
                 if (me._searchEntry.entry.text != '')
                     me._searchEntry.entry.text = '';
                 // Next, if we're in one of the "more" modes or showing the details pane, close them
-                else if (me._moreAppsMode || me._moreDocsMode || me._detailsShowing())
+                else if (me._resultsShowing())
                     me.unsetMoreMode();
                 // Finally, just close the overlay entirely
                 else
@@ -600,10 +600,7 @@ Dash.prototype = {
 
         this._moreAppsLink.setText("More...");
 
-        this._repositionDetails();
-        if (!this._detailsShowing()) {
-            this.emit('panes-removed');
-        }
+        this._hideDetails();
     },   
  
     // Sets the 'More' mode for browsing documents.
@@ -639,11 +636,7 @@ Dash.prototype = {
 
         this._moreDocsLink.setText("More...");
 
-        this._repositionDetails();
-
-        if (!this._detailsShowing()) {
-            this.emit('panes-removed');
-        }
+        this._hideDetails();
     },
 
     _setSearchMode: function() {
@@ -682,11 +675,7 @@ Dash.prototype = {
         this._resultsDocsSection._unsetSearchMode();
         this._resultsDocsSection.actor.set_y(0);
 
-        this._repositionDetails();
-
-        if (!this._detailsShowing()) {
-            this.emit('panes-removed');
-        }
+        this._hideDetails();
     },
 
     _repositionDetails: function () {
@@ -705,6 +694,13 @@ Dash.prototype = {
         this.emit('panes-displayed');
     },
 
+    _hideDetails: function() {
+        if (!this._detailsShowing)
+            return;
+        this._detailsPane.hide();
+        this.emit('panes-removed');
+     },
+
     _detailsShowing: function() {
         return this._detailsPane.visible;
     },